package com.smedi.ismedi.notification.core.domain.service.impl;

import com.smedi.ismedi.notification.core.domain.aggregatemodel.MailLog;
import com.smedi.ismedi.notification.core.domain.repository.MailLogRepository;
import com.smedi.ismedi.notification.core.domain.service.MailLogDomainService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @className: MailLogDomainServiceImpl
 * @Description: TODO
 * @version: v1.0.0
 * @author: wzx
 * @date: 2022/11/23 15:38
 */

@Slf4j
@Service
@AllArgsConstructor
public class MailLogDomainServiceImpl implements MailLogDomainService {

    private final MailLogRepository mailLogRepository;
    @Override
    public void batchSaveMailsLogs(List<MailLog> list) {
        for (MailLog mailLog : list) {
            mailLogRepository.doInsert(mailLog);
        }
    }
}